﻿CREATE PROCEDURE [dbo].[sp_Get_ZipIds]
	@Month varchar(2), 
	@Year varchar(4)
AS
	SELECT z.ZipID FROM dbo.Zips z
	INNER JOIN dbo.OrderZip oz
	ON oz.ZipID = z.ZipID
	INNER JOIN dbo.Orders o
	ON o.OrderID = oz.OrderID
	WHERE o.PeroidYear = @Year AND o.PeroidMonth = @Month